package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.StOrderDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StOrderMapper;
import com.ruoyi.system.domain.StOrder;
import com.ruoyi.system.service.IStOrderService;

/**
 * 食堂订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-06
 */
@Service
public class StOrderServiceImpl implements IStOrderService 
{
    @Autowired
    private StOrderMapper stOrderMapper;

    /**
     * 查询食堂订单
     * 
     * @param id 食堂订单主键
     * @return 食堂订单
     */
    @Override
    public StOrder selectStOrderById(String id)
    {
        return stOrderMapper.selectStOrderById(id);
    }

    /**
     * 查询食堂订单列表
     * 
     * @param stOrder 食堂订单
     * @return 食堂订单
     */
    @Override
    public List<StOrder> selectStOrderList(StOrder stOrder)
    {
        return stOrderMapper.selectStOrderList(stOrder);
    }

    @Override
    public List<StOrderDetail> selectStOrderdetailListbyids(String[] ids) {
        return stOrderMapper.selectStOrderdetailListbyids(ids);
    }

    /**
     * 新增食堂订单
     * 
     * @param stOrder 食堂订单
     * @return 结果
     */
    @Override
    public int insertStOrder(StOrder stOrder)
    {
        return stOrderMapper.insertStOrder(stOrder);
    }

    @Override
    public Double selectcountamountStOrder(String username) {
        return stOrderMapper.selectcountamountStOrder(username);
    }

    /**
     * 修改食堂订单
     * 
     * @param stOrder 食堂订单
     * @return 结果
     */
    @Override
    public int updateStOrder(StOrder stOrder)
    {
        return stOrderMapper.updateStOrder(stOrder);
    }

    /**
     * 批量删除食堂订单
     * 
     * @param ids 需要删除的食堂订单主键
     * @return 结果
     */
    @Override
    public int deleteStOrderByIds(String[] ids)
    {
        return stOrderMapper.deleteStOrderByIds(ids);
    }

    /**
     * 删除食堂订单信息
     * 
     * @param id 食堂订单主键
     * @return 结果
     */
    @Override
    public int deleteStOrderById(String id)
    {
        return stOrderMapper.deleteStOrderById(id);
    }

    @Override
    public String selectcountall() {
        return stOrderMapper.selectcountall();
    }
}
